$TITLE ('PL/M-51 TO RTX-51 V5.0 INTERFACE')
$SYMBOLS
$NOXREF
$NOCOND
$NOMOD51
$NORB
$PAGELENGTH(80) PAGEWIDTH(110)
;************************************************************************
;*									*
;*    R T X - 5 1  :   PL/M-51 TO RTX-51 V5.0 INTERFACE FILE 3          *
;*							     		*
;*----------------------------------------------------------------------*
;*                                                                      *
;*    Filename     :   RTXPLM3.A51                                      *
;*    Language     :   Keil A-51                                        *
;*    Dev. system  :   Keil uVision2                                    *
;*    Targetsystem :   Any system based upon 8051 up                    *
;*                                                                      *
;*    Purpose      :   Implements the third part of the PL/M-51 to      *
;*                     RTX-51 V5.xx Interface. This Interface is        *
;*                     dedicated for special purposes (Bitbus-Software) *
;*								     	*
;*----------------------------------------------------------------------*
;* Rev. |  Released   | Programmer    | Comments                        *
;*----------------------------------------------------------------------*
;* 0.1  | 12.11.1991  | Th. Fischler  | Module creation                 *
;* 5.00 | 20.10.1994  | E. Glatz      | Release 5.00                    *
;* 7.00 | 13.11.2001  | T. Mueller    | Release 7.00                    *
;************************************************************************
;*    Copyright 1991 .. 2001 METTLER  &  FUCHS  AG,  CH-8953 Dietikon   *
;************************************************************************


;*----------------------------------------------------------------------*
;*	I M P O R T S
;*----------------------------------------------------------------------*


EXTRN DATA     (?RTX_IE)      ; Interrupt-mask variable from RTXCONF.A51

; RTX-51 V4.xx system-functions

EXTRN   CODE (_os_check_tasks)
EXTRN	CODE (_os_check_task)
EXTRN	CODE (_os_check_mailboxes)
EXTRN	CODE (_os_check_mailbox)
EXTRN   CODE (_os_check_pool)



;*----------------------------------------------------------------------*
;*	E X P O R T S
;*----------------------------------------------------------------------*

PUBLIC	?p_os_check_task?BYTE
PUBLIC	p_os_check_task
PUBLIC	?p_os_check_tasks?BYTE
PUBLIC	p_os_check_tasks
PUBLIC	?p_os_check_mailbox?BYTE
PUBLIC	p_os_check_mailbox
PUBLIC	?p_os_check_mailboxes?BYTE
PUBLIC	p_os_check_mailboxes
PUBLIC  ?p_os_check_pool?BYTE
PUBLIC	p_os_check_pool


;*----------------------------------------------------------------------*
;*      S E G M E N T   D E F I N I T I O N S
;*----------------------------------------------------------------------*

; One Segment for all Code and Data in this File
?RTX?PLM2CINTF_CODE?RTXPLM3             SEGMENT CODE
?RTX?PLM2CINTF_DATA?RTXPLM3             SEGMENT DATA


;*----------------------------------------------------------------------*
;*      D A T A   D E F I N I T I O N S
;*----------------------------------------------------------------------*

; PL/M-51 compatible Parameter area in DATA-memory

        RSEG  ?RTX?PLM2CINTF_DATA?RTXPLM3
?p_os_check_mailboxes?BYTE:
table?210:		DS  2

        ORG 0
?p_os_check_mailbox?BYTE:
mailbox?220:		DS  1
table?220:		DS  2

        ORG 0
?p_os_check_tasks?BYTE:
table?230:		DS  2

        ORG 0
?p_os_check_task?BYTE:
task_number?240:        DS  1
table?240:		DS  2

        ORG 0
?p_os_check_pool?BYTE:             ; The greatest Parameter-field in this
block_size?250:         DS  2      ; Segment must be the last !
table?250:              DS  2      ; (for proper segment-size allocation
                                   ; by BL-51)


;*----------------------------------------------------------------------*
;*      P R O C E D U R E   D E F I N I T I O N S
;*----------------------------------------------------------------------*

;
; 
; alien signed char p_os_check_mailboxes (t_rtx_allmbxtab xdata *table)

        RSEG  ?RTX?PLM2CINTF_CODE?RTXPLM3
p_os_check_mailboxes:
			; SOURCE LINE # 203
; {
			; SOURCE LINE # 204
;    return os_check_mailboxes (table);
			; SOURCE LINE # 205
	MOV  	R7,table?210+01H
	MOV  	R6,table?210
        SETB    ?RTX_IE.7                   ; enable all Interrupts
        LCALL   _os_check_mailboxes
	MOV  	A,R7
; }
			; SOURCE LINE # 206
?C0022:
	RET  	
; END OF p_os_check_mailboxes

; 
; 
; alien signed char p_os_check_mailbox (unsigned char mailbox,

        RSEG  ?RTX?PLM2CINTF_CODE?RTXPLM3
p_os_check_mailbox:
			; SOURCE LINE # 209
;                                       t_rtx_onembxtab xdata *table)
; {
			; SOURCE LINE # 211
;    return os_check_mailbox (mailbox, table);
			; SOURCE LINE # 212
	MOV  	R7,mailbox?220
	MOV  	R5,table?220+01H
	MOV  	R4,table?220
        SETB    ?RTX_IE.7                   ; enable all Interrupts
        LCALL   _os_check_mailbox
	MOV  	A,R7
; }
			; SOURCE LINE # 213
?C0023:
	RET  	
; END OF p_os_check_mailbox

; 
; 
; alien signed char p_os_check_tasks (t_rtx_alltasktab xdata *table)

        RSEG  ?RTX?PLM2CINTF_CODE?RTXPLM3
p_os_check_tasks:
			; SOURCE LINE # 216
; {
			; SOURCE LINE # 217
;    return os_check_tasks (table);
			; SOURCE LINE # 218
	MOV  	R7,table?230+01H
	MOV  	R6,table?230
        SETB    ?RTX_IE.7                   ; enable all Interrupts
        LCALL   _os_check_tasks
	MOV  	A,R7
; }
			; SOURCE LINE # 219
?C0024:
	RET  	
; END OF p_os_check_tasks

; 
; 
; alien signed char p_os_check_task (unsigned char task_number,

        RSEG  ?RTX?PLM2CINTF_CODE?RTXPLM3
p_os_check_task:
			; SOURCE LINE # 222
;                                    t_rtx_onetasktab xdata *table)
; {
			; SOURCE LINE # 224
;    return os_check_task (task_number, table);
			; SOURCE LINE # 225
	MOV  	R7,task_number?240
	MOV  	R5,table?240+01H
	MOV  	R4,table?240
        SETB    ?RTX_IE.7                   ; enable all Interrupts
        LCALL   _os_check_task
	MOV  	A,R7
; }
			; SOURCE LINE # 226
?C0025:
	RET  	
; END OF p_os_check_task

; 
; 
; alien signed char p_os_check_pool (unsigned int block_size,

        RSEG  ?RTX?PLM2CINTF_CODE?RTXPLM3
p_os_check_pool:
			; SOURCE LINE # 229
;                                    t_rtx_blockinfo xdata *table)
; {
			; SOURCE LINE # 231
;    return os_check_pool (block_size, table);
			; SOURCE LINE # 232
	MOV  	R7,block_size?250+01H
	MOV  	R6,block_size?250
	MOV  	R5,table?250+01H
	MOV  	R4,table?250
        SETB    ?RTX_IE.7                   ; enable all Interrupts
        LCALL   _os_check_pool
	MOV  	A,R7
; }
			; SOURCE LINE # 233
?C0026:
	RET  	
; END OF p_os_check_pool



;
;   END OF MODULE
;
	END
